package com.sf.iisp.bind.biz;

import com.sf.iisp.BindingException;
import com.sf.iisp.bind.domain.BindingRecord;
import com.sf.iisp.bind.domain.MessageHead;
import com.sf.iisp.bind.domain.ReceiveBindingInfo;

import java.util.List;

/**
 * 解绑服务
 * Created by qi on 16-7-5.
 */
public interface UnbindingBiz {

    /**
     * 解绑号码(批量)
     *
     * @param phones 需要绑定的号码
     * @return 是否解绑
     * @throws BindingException
     */
    public Boolean unbind(List<String> phones) throws BindingException;

    /**
     * 解绑号码
     *
     * @param phone 号码
     * @param time  失效时间,单位:分钟
     * @return 是否解绑
     * @throws BindingException
     */
    public Boolean unbind(String phone, long time) throws BindingException;

    /**
     * 解绑号码
     *
     * @param courierPhone  收派员号码
     * @param customerPhone 　客户号码
     * @param virtualNo     虚拟号码
     * @param head          消息头
     * @throws BindingException
     * @return　是否解绑
     */
    public Boolean unbind(String courierPhone, String customerPhone, String virtualNo, String basicTransId, MessageHead head) throws BindingException;

    /**
     * 解绑号码
     *
     * @param json 需要解绑的JSON： "{\"courierPhone\":\"15914085476\",\"customerPhone\":\"18675523334\",\"extendField1\":\"002AAABVYGDxe8feo6mDdZHYKeIwxX5Npzf\",\"msgType\":\"iisp.telephone.unbind\",\"sysCode\":\"SGS\",\"transId\":\"a700207c-6b99-4f7e-8ea8-e373b4a41719\",\"transTimestamp\":\"2016-07-19 10:13:11\"}";
     * @return 是否解绑
     * @throws com.sf.iisp.BindingException
     */
    public String unbind(String json) throws BindingException;

    /**
     * 解绑号码
     *
     * @param bindingRecord
     * @return
     * @throws BindingException
     */
    public String unbind(BindingRecord bindingRecord) throws BindingException;


}





